#include <stdlib.h>
#include<stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include <unistd.h>
#include <sys/ioctl.h>
#define IRQF_TRIGGER_RISING 0x00000001



int main(int argc, char  **argv)
{
    int  fd;
    int  b,ret;
    unsigned char data =0;
    static int a = 0;

    fd = open("/dev/ioinput", O_RDWR);
    if (fd < 0)
    {
        printf("/dev/gpios open failed\n");
        exit(1);
    }
   // char buf[4]={0x02,0x02,0x03,0x04};
   //ret =  write(fd,buf,4);
   // if(ret==-1)
    {
   //     printf("write  fail!\n");
//
  //  }

   //ret =  read(fd,buf,4);
   // if(ret==-1)
    {
   //  //   printf("read  fail!\n");

   // }
#if 0
/*
    unsigned int cmd =7;
    unsigned long irqflag = IRQF_TRIGGER_RISING;
     ret = ioctl(fd,cmd,irqflag);
  //  printf("%d %d %d\n",io_conf.action_io,io_conf.sample_io,io_conf.sample_io_enable);
    if(ret!=0)
    {
        printf("ioctl action_io fail!\n");
        close(fd);
        return (-1);
    }


      cmd =3;
      irqflag = 0x00002;
     ret = ioctl(fd,cmd,irqflag);
  //  printf("%d %d %d\n",io_conf.action_io,io_conf.sample_io,io_conf.sample_io_enable);
    if(ret!=0)
    {
        printf("ioctl action_io fail!\n");
        close(fd);
        return (-1);
    }
*/
#endif
     while(1)
	sleep(1);
      close(fd);
}
